package mvp.com.bbc.ui.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.AppBarLayout;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

/**
 * Created by Administrator on 2017/10/7.
 */

public class ArtListFragment3 extends Fragment {
    private static AppBarLayout mAppBarLayout;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        TextView tv = new TextView(getContext());
        tv.setText("列表三");
        tv.setGravity(Gravity.CENTER);
        tv.setTextSize(20);
        return tv;
    }
    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        String type = getArguments().getString("type");
        Log.v("cbf", "type = " + type);
    }

    public static Fragment instanct(String type, AppBarLayout appBarLayou) {
        mAppBarLayout = appBarLayou;
        ArtListFragment1 listFragment1 = new ArtListFragment1();
        Bundle bundle = new Bundle();
        bundle.putString("type", type);
        listFragment1.setArguments(bundle);
        return listFragment1;
    }
}
